package DVD;

import java.util.Scanner;

public class RentSys {

    private RentService rentService = new RentService();
    Scanner sc = new Scanner(System.in);

    public void login(){
        System.out.println("请输入用户名：");
        String username =sc.next();
        System.out.println("请输入密码：");
        String password =sc.next();

       People p = rentService.login(username,password);
       if(p.isAdmin()){
               AdminRentSys adminRentSys = new AdminRentSys();
               adminRentSys.start();

           }else if(!p.isAdmin()){
               UserRentSys userRentSys = new UserRentSys();
               userRentSys.start(p);
           }
       }




    public static void main(String[] args) {
        RentSys rentSys = new RentSys();
        rentSys.login();

    }
}


